package com.alisls.demo.springcloud.stream.rabbit.receiver;

import com.alisls.demo.springcloud.stream.rabbit.channel.MyProcessor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

/**
 * 描述信息
 *
 * @author Ke Wang
 * @date 2020/10/15
 */
@Component
@EnableBinding(MyProcessor.class)
@Slf4j
public class MessageListener {

    @StreamListener(MyProcessor.MY_INPUT)
    public void onMessage(String message) {
        log.info("接收到消息：{}", message);
    }

}
